import { BrowserModule, Title } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { HttpClientModule } from '@angular/common/http';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { NZ_I18N } from 'ng-zorro-antd/i18n';
import { zh_CN } from 'ng-zorro-antd/i18n';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzFormModule } from 'ng-zorro-antd/form';
import { NzInputModule } from 'ng-zorro-antd/input';
import { NzLayoutModule } from 'ng-zorro-antd/layout';
import { NzStatisticModule } from 'ng-zorro-antd/statistic';
import { NzBreadCrumbModule } from 'ng-zorro-antd/breadcrumb';
import { NzMenuModule } from 'ng-zorro-antd/menu';
import { NzIconModule } from 'ng-zorro-antd/icon';
import { NzDividerModule } from 'ng-zorro-antd/divider';
import { NzTableModule } from 'ng-zorro-antd/table';
import { NzCascaderModule } from 'ng-zorro-antd/cascader';
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';
import { NzDrawerModule } from 'ng-zorro-antd/drawer';
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
import { NzRadioModule } from 'ng-zorro-antd/radio';
import { NzMessageModule } from 'ng-zorro-antd/message';

import { registerLocaleData } from '@angular/common';
import zh from '@angular/common/locales/zh';
import { SharedModule } from './shared/shared.module';
import { httpInterceptorProviders } from './shared/services/http/interceptors';
import { AdminComponent } from './pages/admin/admin.component';
import { LoginComponent } from './pages/login/login.component';
import { AdminHeaderComponent } from './pages/admin/shared/components/admin-header/admin-header.component';
import { AdminDashboardComponent } from './pages/admin/shared/components/admin-dashboard/admin-dashboard.component';
import { AdminCarwashesComponent } from './pages/admin/shared/components/admin-carwashes/admin-carwashes.component';
import { AdminUsersComponent } from './pages/admin/shared/components/admin-users/admin-users.component';
import { AdminOrdersComponent } from './pages/admin/shared/components/admin-orders/admin-orders.component';
import { AdminSettingComponent } from './pages/admin/shared/components/admin-setting/admin-setting.component';
import { CreateCarwashFormComponent } from './pages/admin/shared/components/create-carwash-form/create-carwash-form.component';
import { EditCarwashFormComponent } from './pages/admin/shared/components/edit-carwash-form/edit-carwash-form.component';
import { DashboardStatisticComponent } from './pages/admin/shared/components/dashboard-statistic/dashboard-statistic.component';
import { DashboardEchartsComponent } from './pages/admin/shared/components/dashboard-echarts/dashboard-echarts.component';
import { NgxEchartsModule } from 'ngx-echarts';
import { AdminStaffsComponent } from './pages/admin/shared/components/admin-staffs/admin-staffs.component';
import { CreateStaffFormComponent } from './pages/admin/shared/components/create-staff-form/create-staff-form.component';
import { EditStaffFormComponent } from './pages/admin/shared/components/edit-staff-form/edit-staff-form.component';

registerLocaleData(zh);

@NgModule({
  declarations: [
    AppComponent,
    AdminComponent,
    LoginComponent,
    AdminHeaderComponent,
    AdminDashboardComponent,
    AdminCarwashesComponent,
    AdminUsersComponent,
    AdminOrdersComponent,
    AdminSettingComponent,
    CreateCarwashFormComponent,
    EditCarwashFormComponent,
    DashboardStatisticComponent,
    DashboardEchartsComponent,
    AdminStaffsComponent,
    CreateStaffFormComponent,
    EditStaffFormComponent,
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    FormsModule,
    ReactiveFormsModule,
    HttpClientModule,
    BrowserAnimationsModule,
    SharedModule,
    NzButtonModule,
    NzFormModule,
    NzInputModule,
    NzLayoutModule,
    NzStatisticModule,
    NzBreadCrumbModule,
    NzMenuModule,
    NzIconModule,
    NzDividerModule,
    NzTableModule,
    NzCascaderModule,
    NzPopconfirmModule,
    NzDrawerModule,
    NzInputNumberModule,
    NzRadioModule,
    NzMessageModule,
    NgxEchartsModule,
  ],
  providers: [
    { provide: NZ_I18N, useValue: zh_CN },
    httpInterceptorProviders,
    Title,
  ],
  bootstrap: [AppComponent],
})
export class AppModule {}
